<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!--CSRF-->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/images/favicon.png') }}">
    <title>@yield('title', '管理端') | 云柜</title>
    <!-- Bootstrap Core CSS -->
    <link href="{{ asset('assets/plugins/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ asset('assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css') }}" rel="stylesheet">
    <!-- This page CSS -->
    <!-- Vector CSS -->
    <link href="{{ asset('assets/plugins/vectormap/jquery-jvectormap-2.0.2.css') }}" rel="stylesheet" />
    <link rel="stylesheet" href="{{ asset('assets\element-ui\lib\theme-chalk\index.css') }}">
    <!-- import Vue before Element -->
    <script src="{{ asset('assets\vue\vue.js')}}"></script>

    <!-- import JavaScript -->
    <script src="{{ asset('assets\element-ui\lib\index.js') }}"></script>
    <script src="{{ asset('assets\axios\axios.min.js') }}"></script>

    <!-- Custom CSS -->
    <link href="{{ asset('assets/css/style.css') }}" rel="stylesheet">
    <link href="{{ asset('assets/css/colors/default-dark.css') }}" id="theme" rel="stylesheet">
    <script src="{{ asset('assets/element-ui/lib/sweetalert.min.js') }}"></script>
    
    @yield('admin-style')


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body class="fix-header fix-sidebar card-no-border">

    <!--_header.blade.php_start-->

    <!--_header.blade.php_end-->

    <!-- ============================================================== -->
    <!-- Preloader - style you can find in spinners.css -->
    <!-- ============================================================== -->
    <div class="preloader">
        <div class="loader">
            <div class="loader__figure"></div>
            <p class="loader__label">Admin Pro</p>
        </div>
    </div>
    <!-- ============================================================== -->
    <!-- Main wrapper - style you can find in pages.scss -->
    <!-- ============================================================== -->
    <div id="main-wrapper">
        <!-- ============================================================== -->
        <!-- Topbar header - style you can find in pages.scss -->
        <!-- ============================================================== -->
        @include('layouts._header')
        <!-- ============================================================== -->
        <!-- End Topbar header -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- Left Sidebar - style you can find in sidebar.scss  -->
        <!-- ============================================================== -->
        @include('layouts._menus')
        <!-- ============================================================== -->
        <!-- End Left Sidebar - style you can find in sidebar.scss  -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- Page wrapper  -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <div id="app" class="page-wrapper">

        @yield('content')
        <!-- End Container fluid  -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- footer -->
        <!-- ============================================================== -->
        @include('layouts._footer')
        <!-- ============================================================== -->
        <!-- End footer -->
        <!-- ============================================================== -->
        </div>        
        <!-- ============================================================== -->
        <!-- End Page wrapper  -->
        <!-- ============================================================== -->
    </div>
    <!-- ============================================================== -->
    <!-- End Wrapper -->
    <!-- ============================================================== -->
    <!-- ============================================================== -->
    <!-- All Jquery -->
    <!-- ============================================================== -->
    <script src="{{ asset('assets/plugins/jquery/jquery.min.js') }}"></script>
    <!-- Bootstrap popper Core JavaScript -->
    <script src="{{ asset('assets/plugins/bootstrap/js/bootstrap.min.js') }}"></script>
    <!-- slimscrollbar scrollbar JavaScript -->
    <!--Menu sidebar -->
    <script src="{{ asset('assets/js/sidebarmenu.js') }}"></script>
    <!--Custom JavaScript -->
    <script src="{{ asset('assets/js/custom.min.js') }}"></script>
    <!-- ============================================================== -->
    <!-- This page plugins -->
    <!-- ============================================================== -->
    
    <!-- Style switcher -->
    <!-- ============================================================== --> 
    <script>
        var app_vue = new Vue({
          el: '#main-wrapper',
          data: function(){
            return {
                notice_total:'',
                notice_lists:[],
            }
          },
          created(){
            this.init()
          },
          methods:{
            notices(){
                var that = this;
                axios.get("{{ route('admin.notices.lists') }}").
                then(res => {
                    that.notice_lists = res.data.data;
                    that.init()
                });
            },
            init(){
                var that = this;
                axios.get("{{ route('admin.notices.noticeTotal') }}").
                then(res => {
                    that.notice_total = res.data.data;
                });
            },
            details(item){
                this.$alert(item.notice.content, item.notice.title, {
                  confirmButtonText: '确定',
                  callback: action => {
                  }
                });
            }
          }
      });
    </script>  
    @yield('admin-js')
</body>

</html>